php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#222748 - 08/22/02 06:29 PM [6.0.x / 6.1.x] Who's Online PM Link 1.0
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Ready for prime time and working in 6.1. <img src="/threads/php/images/icons/wink.gif" alt="" /><br /><br />Mod Name / Version: Who's Online PM Link 1.0<br /><br />Description: This little hack adds a "Send a PM" button next to each user on the Who's Online Screen<br /><br />Screenshot: See Below.<br /><br />Working under: UBB.threads 6.0.1, 6.0.2, 6.0.3, 6.1<br /><br />Any pre-requisites: None<br /><br />Author(s): JoshPet<br /><br />Credits: Saw it on another BB system<br /><br />Files Altered: online.php, online.tmpl<br /><br />Database Altered: No<br /><br />New Files: None<br /><br />Screenshot:<br />[]http://www.pettitfamily.net/josh/OnlinePMScreen.gif[/]


Attachments
54625-WhosOnlinePMLink1.0.txt (114 downloads)

_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#222749 - 08/24/02 02:05 PM Re: [6.x] Who's Online PM Link 1.0 [Re: Daine]
ExcelsiorDDZ Offline
Member

Registered: 08/09/99
Posts: 234
Loc: New York
Cool, works great!
_________________________
Silly ricer.. Wings are for airplanes!

Top
#222750 - 09/22/02 07:18 AM Re: [6.x] Who's Online PM Link 1.0 [Re: Franky]
spiffy Offline
Member

Registered: 03/28/00
Posts: 91
Hi JoshPet, I installed this hack on 6.0.3 and it appears to work fine (i.e. the link appears in the WO page and links to a page where the username is entered properly) however when I try to post the message I get the error<br /><br />"We have no record for the Username that you are trying to send this message to."<br /><br />even though it is the correct username. Could this be because I have "allow special charachters in username in config options"? Although even when I have this set and try usernames which do not have spec chars it still does not work.<br /><br />Any idea what could be causing this please?<br /><br />BTW the url of the link in the case og 'guest' is:<br /><br />http://mydomain/sendprivate.php?Cat=&User=guest<br />

Top
#222751 - 09/22/02 01:21 PM Re: [6.x] Who's Online PM Link 1.0 [Re: maksimum]
Aglavalin Offline
Enthusiast

Registered: 06/18/02
Posts: 394
Loc: Southern California
There was a previous version of this hack for 6.0.x, perhaps you would have better luck with it?

Top
#222752 - 09/22/02 09:41 PM Re: [6.x] Who's Online PM Link 1.0 [Re: maksimum]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Does it do it just for usrenames with special characters.<br /><br />I had this running for a month or two on a 6.0.3 site... never had a problem. I was probably the one who used it the most.<br /><br />You might check what the link should look like.... if special characters are turned on. Look at their profiles and mouse over the "Send a private Message" link..... that link should be the same as the one used in Who's online. That's really all it does. But maybe it does something I'm not aware of when you have special characters turned on.<br /><br />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#222753 - 09/23/02 12:06 AM Re: [6.x] Who's Online PM Link 1.0 [Re: Daine]
Aglavalin Offline
Enthusiast

Registered: 06/18/02
Posts: 394
Loc: Southern California
If you're having problems with spaces in user names, I have some instructions about how to let spaces work when you have the special characters disabled. One of the Daves posted them and I saved it.

Top
#222754 - 09/23/02 08:16 AM Re: [6.x] Who's Online PM Link 1.0 [Re: neuron]
spiffy Offline
Member

Registered: 03/28/00
Posts: 91
Please ignore my point above:<br /><br />"Hi JoshPet, I installed this hack on 6.0.3 and it appears to work fine (i.e. the link appears in the WO page and links to a page where the username is entered properly) however when I try to post the message I get the error..."<br /><br />This was due to a silly mistake I made when editing the template.<br /><br />Sorry and thanks for your help.

Top
#222755 - 10/23/02 02:59 PM Re: [6.x] Who's Online PM Link 1.0 [Re: maksimum]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Iīm working on forum specific templates.<br /><br />In showflat and showthreaded I want to change the reply link to a PM link.<br /><br />I think I know how to ad what I need in the tmplīs, but how do I modify the code written for onlie.php to work in showflat.php and showthreaded.php?<br />

Top
#222756 - 10/23/02 04:13 PM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
So you want to replace the "Reply" button with a link that sends a PM to that user?<br /><br />If so... I can look at this later this evening for you. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#222757 - 10/24/02 10:53 AM Re: [6.x] Who's Online PM Link 1.0 [Re: Daine]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Yes, thatīs what I want to do! Would be great! <img src="/forum/images/graemlins/smile.gif" alt="" />

Top
#222758 - 10/24/02 01:39 PM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Wanted to make sure.<br /><br />Should be easy. Will look at this evening. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#222759 - 10/24/02 02:37 PM Re: [6.x] Who's Online PM Link 1.0 [Re: Daine]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Thanks! <br /><br />Iīm rebuilding the forum completly thanks to all the help at the different dev. forums. <br /><br />This could bee really cool at the end... if there is such a thing as an ending in this case! <img src="/forum/images/graemlins/grin.gif" alt="" /><br /><br />

Top
#222760 - 10/25/02 12:22 AM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Haven't tested this...<br /><br />but this should change the "Reply" link to a link which will reply via Pm instead.<br /><br />It *should* work for you. Please report back and let me know how you made out. If it's a thumbsup.... I'll post this as a separate mod. <img src="/forum/images/graemlins/wink.gif" alt="" />


Attachments
59427-replyviapmlink.txt (41 downloads)

_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#222761 - 10/25/02 08:08 AM Re: [6.x] Who's Online PM Link 1.0 [Re: Daine]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
This worked great! <img src="/forum/images/graemlins/laugh.gif" alt="" /><br /><br />But I need showflat.php and showthreaded.php to use this only on specified forums using separate tmplīs. All the other forums should work as normal.<br /><br />Like this:<br /><br />I have duplicated showthreaded.tmpl, showflat.tmpl and postlist.tmpl. <br /><br />The duplicates are renamed to showthreadedhard.tmpl, showflathard.tmpl and postlisthard.tmpl. <br /><br />In these files Iīve made my changes and then uploaded the files to templates/default.<br /><br />In postlist.php, showflat.php and showthreaded.php Iīve done this (based on this mod. ):<br /><br />Iīve changed this in postlist.php:<br /><pre><font class="small">code:</font><hr><br /> include ("$thispath/templates/$tempstyle/postlist.tmpl"); <br /></pre><hr><br /><br />to this<br /><pre><font class="small">code:</font><hr><br />if ($Board == "supertest") {<br /> include ("$thispath/templates/$tempstyle/postlisthard.tmpl");<br />}<br />else {<br /> include ("$thispath/templates/$tempstyle/postlist.tmpl"); <br />} <br /><br /><br /> </pre><hr> <br />Iīve done the same in showflat.php and showthreaded.php, but with links to their specific templates, of course.<br /><br /><br />Later on, when the supertest forum is complete and ready for launch, I will change this:<br /><br /><pre><font class="small">code:</font><hr> <br />if ($Board == "supertest") {<br /><br /></pre><hr> <br />to this<br /> <pre><font class="small">code:</font><hr> <br />if ($Board == "supertest" or $Board == "specialforum1" or $Board == "specialforum2" or $Board == "specialforum3") { <br /></pre><hr> <br /><br />Supertest is my development forum, with admin only access. specialforum1, 2, 3, 4 etc is the not yet created forums that will use these modified features. There will be at least 15 of these special forums at the launch. All other forums will work as normal.<br /><br />Is it possible to ad something like the change Iīve done in postlist.php, showlist.php and showthreaded.php, but instead of telling the x.php file what tmplīs to use it states what link, PM or Reply, that should be used if the forum is a normal or modified one?

Top
#222762 - 10/25/02 09:00 AM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
You could set up the replylnkstart and replylinkstop inside an if statement.....<br /><br />Put the "if this board" .... then the coding I gave you for the reply link.... then "else" and the coding that was there. That should do the trick.<br /><br />If you need specific help, I can write something up this evening. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#222763 - 10/25/02 11:37 AM Re: [6.x] Who's Online PM Link 1.0 [Re: Daine]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Worked just great!<br /><br />Wrote it like this: <br /><pre><font class="small">code:</font><hr> if ($Board == "supertest") {<br /> <br /> $postrow[$i]['replylinkstart'] = "<a href=\"{$config['phpurl']}/sendprivate.php?Cat=$Cat&amp;User=$EUsername\">";<br /> $postrow[$i]['replylinkstop'] = "</a>";<br /> }<br />else {<br /> <br /> $postrow[$i]['replylinkstart'] = "<a href=\"{$config['phpurl']}/newreply.php?Cat=$Cat&amp;Board=$Board&amp;Number=$Number&amp;page=$page&amp;view=$view&amp;what=showflat&amp;sb=$sb&amp;o=$o&amp;fpart=$fpart&amp;vc=1\">";<br /> $postrow[$i]['replylinkstop'] = "</a>";<br /> }<br /> </pre><hr> <br /><br /><br />Now I have another problem, wich I think is far more complicated to work around. <img src="/forum/images/graemlins/grin.gif" alt="" /><br /><br />Iīm going to use these new forums as areas for personal ads. I want registered users to be able to advertise anonymously and recive answers to their UBBT account.<br /><br />So what I need to do now is hide the posters username in every place it might show up. Commenting out (or mark as hidden) the recipent field in the PM window is not such a big deal, but a posters username shows up in so many different places: the link to the PM window, in various places showing new posts, in the posters sent messages box, etc etc.<br /><br />Am I asking for to much here? Is this at all possible?<br /><br />

Top
#222764 - 10/25/02 01:21 PM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Wow.... that would be tough... and you can't fix the URL problem.<br /><br />6.2 will be based on user number...which will fix the problem of the name showing in the URL.<br /><br />I've got an idea.... I wonder if you can have user's post their replies.... but somehow rig those forums so that only the original poster could view the replies.<br /><br />Almost like a private topic thing that we discussed here a while ago. <img src="/forum/images/graemlins/tongue.gif" alt="" /><br /><br />Might be pretty complicated though. <img src="/forum/images/graemlins/crazy.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#222765 - 10/25/02 02:25 PM Re: [6.x] Who's Online PM Link 1.0 [Re: Daine]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Hmm... sounds like itīs a better idea to find an existing ads system and integrate with UBBT?! Know ībout one that might work?<br /><br />I really would like to have it all in UBBT, but if itīs such a big operation.... <img src="/forum/images/graemlins/frown.gif" alt="" />

Top
#222766 - 10/25/02 02:29 PM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Lemme<br />tinker this weekend. <img src="/forum/images/graemlins/cool.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#222767 - 10/25/02 06:21 PM Re: [6.x] Who's Online PM Link 1.0 [Re: Daine]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Sure! <img src="/forum/images/graemlins/grin.gif" alt="" />

Top
#222768 - 10/26/02 08:10 PM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I took a quick look... and have this working on showflat.php..... I didn't look at showthreaded yet..... because there are some problems that I don't know how to work around.<br /><br />While I kinda got it..... the whole thing is probably just out of my reach... maybe with enough hacking around it could be done. It would certainly take me alot more free time than I've got. <img src="/forum/images/graemlins/wink.gif" alt="" /><br /><br />What this does.... (in showflat view) is only show the replies to the person who started the topic... everyone else only sees the main post:<br /><br />The problems that I noticed off the top of my head:<br /> - the replies would show up in a search<br /> - the replies would show up when someone "showed all posts by this user" <br /> - when the user makes a reply...they can "view their post" then see the whole thread<br /><br /><pre><font class="small">code:</font><hr><br />##<br />## Open showflat.php<br />##<br /><br />#<br /># Find this:<br />#<br /><br />// -----------------------------------------<br />// Grab the main post number for this thread<br /> $Number = addslashes($Number);<br /> $query = "<br /> SELECT B_Main<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Number = '$Number'<br /> AND B_Board = '$Board'<br /> ";<br /> $sth = $dbh -> do_query($query);<br /> list ($current) = $dbh -> fetch_array($sth);<br /> $dbh -> finish_sth($sth);<br /><br />#<br /># Change to:<br />#<br /><br />// -----------------------------------------<br />// Grab the main post number for this thread<br /> $Number = addslashes($Number);<br /> $query = "<br /> SELECT B_Main, B_Username<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Number = '$Number'<br /> AND B_Board = '$Board'<br /> ";<br /> $sth = $dbh -> do_query($query);<br /> list ($current,$MainUsername) = $dbh -> fetch_array($sth);<br /> $dbh -> finish_sth($sth);<br /><br /><br />#<br /># Find this:<br />#<br /><br />// -----------------------------------------------------------------<br />// We need to know how many posts of this thread to display per page<br /> if ($fpart <= 1) {<br /> $Totalgrab = $Totaldisplay;<br /> }<br /> else {<br /> $Startat = $Totaldisplay * ($fpart - 1);<br /> $Totalgrab = "$Startat, $Totaldisplay";<br /> }<br /> $Limit = "LIMIT $Totalgrab";<br /> if ($fpart == "all") {<br /> $Limit = "";<br /> }<br /><br /> $threadnumber = $Number;<br /><br /><br />#<br /># Change to this:<br />#<br /><br />// -----------------------------------------------------------------<br />// We need to know how many posts of this thread to display per page<br /> if ($user['U_Username'] == $MainUsername) {<br /> if ($fpart <= 1) {<br /> $Totalgrab = $Totaldisplay;<br /> }<br /> else {<br /> $Startat = $Totaldisplay * ($fpart - 1);<br /> $Totalgrab = "$Startat, $Totaldisplay";<br /> }<br /> $Limit = "LIMIT $Totalgrab";<br /> if ($fpart == "all") {<br /> $Limit = "";<br /> }<br /> }<br /> else {<br /> $Limit = "LIMIT 1";<br /> }<br /> <br /> $threadnumber = $Number;<br /></pre><hr><br /><br />Since you need this in a bunch of boards... you would need to add a lot of "if the board is xxxxxxx" then have it check if the $user['U_Username'] was equal to the B_Username of the main post.<br />There would be lots of scripts you'd have to work this into.<br /><br />But in theory it's probably possible. <img src="/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#222769 - 10/27/02 05:53 PM Re: [6.x] Who's Online PM Link 1.0 [Re: Daine]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Oki... I give up! <img src="/forum/images/graemlins/smirk.gif" alt="" /><br /><br />Guess Iīll have to find an existing system and integrate the login with UBBT.

Top
#222770 - 10/27/02 07:15 PM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
With 6.2 it will be user number based. <br /><br />So then if you did the private message idea... you wouldn't see the username in the URL... just the number, which would still be anonymous.<br /><br />You could easily remove the option to "keep a copy of this message" from the PM templates... which is another identity give away.<br /><br />What's this for again? Like a personals response thing?
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#222771 - 10/28/02 04:19 AM Re: [6.x] Who's Online PM Link 1.0 [Re: Daine]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Oki... But how far away is 6.2?<br /><br />Yes, it for personals. I want to give my registered user an anonymous personal advertisment area. "Man seeks Woman", Woman seeks Alien", "Alien seeks MiB". <img src="/forum/images/graemlins/smile.gif" alt="" />

Top
#222772 - 10/28/02 08:35 AM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
No official word yet as to a time frame.<br /><br />I know it's still in development and hasn't even entered beta yet... so I wouldn't wait on it. <img src="/forum/images/graemlins/tongue.gif" alt="" /><br /><br />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#222773 - 10/30/02 03:53 AM Re: [6.x] Who's Online PM Link 1.0 [Re: Daine]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Ok <img src="/forum/images/graemlins/frown.gif" alt="" /> <br /><br />Iīll start looking for an allternative system asap. Thank you for helping! <img src="/forum/images/graemlins/smile.gif" alt="" />

Top
#222774 - 12/16/02 03:38 PM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
cstaber Offline
Journeyman

Registered: 08/17/02
Posts: 124
Loc: Tampa, FL
Got this working with 6.2 BR2...It's really easy (hey, I figured it out...musta been easy;) )<br /><br />All you have to do is in this:<br /><br /> <pre><font class="small">code:</font><hr> <br />//------------------------------------------------------<br /> // Set up the link to send the user a Private Message - by JoshPet<br /> if ($config['private']) {<br /> $encoded = rawurlencode($Username);<br /> $privmessage = "<a href=\"{$config['phpurl']}/sendprivate.php?Cat=$Cat&amp;User=$encoded\"><img src=\"{$config['images']}/sendprivate.gif\" alt=\"{$ubbt_lang['PRIV_HEAD']}\" border=\"0\"></a>"; <br /> }<br /><br /> </pre><hr> <br /><br />Change <br /> <pre><font class="small">code:</font><hr> $encoded = rawurlencode($Username);<br /> </pre><hr> <br />to<br /> <pre><font class="small">code:</font><hr> $encoded = rawurlencode($Uid);<br /> </pre><hr> <br />Works just fine for me now <img src="/forum/images/graemlins/wink.gif" alt="" />

Top
#222775 - 03/02/03 12:41 AM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
smilesforu Offline
Junior Member

Registered: 01/31/02
Posts: 676
This one gonna work on 6.2.2? Just trying to keep Josh busy <img src="/forum/images/graemlins/smile.gif" alt="" />

Top
#222776 - 03/02/03 04:29 AM Re: [6.x] Who's Online PM Link 1.0 [Re: Kelly]
Astaran Offline
Addict

Registered: 12/21/00
Posts: 1545
Loc: Germany
Yes, it'll work if you apply the change cstaber posted above.
_________________________
Running a community? -> Keep informed and take it to the next level

Top
#222777 - 12/27/03 07:08 AM Re: [6.x] Who's Online PM Link 1.0 [Re: -Fusion-]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Will this work with 6.4?

Top
#222778 - 12/28/03 04:16 PM Re: [6.x] Who's Online PM Link 1.0 [Re: tubedogg_dup1]
ScottCargill Offline
Journeyman

Registered: 02/01/01
Posts: 144
Loc: Bakersfield, Ca.
[]Gregori said:<br />Will this work with 6.4? [/]<br /><br />Yes.<br /><br />If I remember right, you need to change the following in the instructions.<br /><br />
Code:
 ABOVE it, add this:<br /><br />	//------------------------------------------------------<br />	// Set up the link to send the user a Private Message -  by JoshPet<br />      if ($config['private']) {<br />         $encoded = rawurlencode($Username);<br />         $privmessage = "&lt;a href=\"{$config['phpurl']}/sendprivate.php?Cat=$Cat&amp;amp;User=$encoded\"&gt;&lt;img src=\"{$config['images']}/sendprivate.gif\" alt=\"{$ubbt_lang['PRIV_HEAD']}\" border=\"0\"&gt;&lt;/a&gt;"; <br />      } 
<br /><br />change the encoded $Username to $EUsername and it'll work.
_________________________
Scott Cargill -WebMaster
East Hills Kung Fu San Soo

Top
Page 1 of 2 1 2 >



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks